<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="../js/vue2.6.12.js"></script>
</head>
<body>
    <div id="app">
        <ul>
            <li v-for="(item,index) in lists" :key="index">{{item}} <button @click="del(index)">del</button></li>
        </ul>
    </div>
    <div></div>
</body>
<script>
    var vm =new Vue({
        el:"#app",
        data:{
            lists:[1,2,3,4,5,6]
        },
        methods:{
            del(index){
                this.lists.splice(index,1);
            }
        }
    });
</script>
<script>

    function fun(){

    }
</script>
</html>